/************************************************************************ Description ************************************************************************* This PHP function takes a block of "formatted" ASCII text and converts it to valid HTML formatting. Specifically, it does the following: *text* becomes bolded _text_ becomes italicized (no, not underlined, see FAQ below) lines starting with * or . or - or -- are converted to bulleted lists lines starting with 1.2.3. or 1)2)3) or # are converted to numbered lists ------,______,======= are converted to horizontal rules http://, mailto://, ftp:// links are made live indented text converts to blockquotes new lines convert to paragraphs html entities are converted to their equivalents (that is, & becomes &, etc) ************************************************************************/ function text2html($text, $lnpath) { // fix line breaks $text = str_replace("\r\n","\n",$text); // windows to unix $text = str_replace("\r","\n",$text); // mac to unix $text = preg_replace("/^\n+/",'',$text); // trim beginning linebreaks $text = preg_replace("/\n+$/",'',$text); // trim ending linebreaks // convert to html entities #$text = htmlentities($text); // line $text = preg_replace('/______/','
\1',$text); $text = preg_replace('/<\/blockquote>[\s]*?
/', "\n\n",$text); // optimize any white space $text = preg_replace('/ +/',' ', $text); $text = preg_replace("/\t+/","\t", $text); $text = preg_replace("/\n+/","\n", $text); // remove adjacant lists $text = preg_replace("/<\/ol>\n/", '',$text); $text = preg_replace("/<\/ul>\n
/", '',$text); // highlight any links (watch out encroaching tags and for punctuation) $text = preg_replace('/(http:\/\/|https:\/\/|ftp:\/\/|mailto:)([^\s<]+[^\.!?&,\)\(\<\-\s])/', '\1\2', $text); // local links $text = preg_replace('/(httpl:\/\/)([^\s<]+[^\.!?&,\)\(\<\-\s])/', '\2', $text); // picture $text = preg_replace('/(apic:\/\/)([^\s<]+[^\.!?&,\)\(\<\-\s])/', '
', $text); // picture on right side of wrapped text $text = preg_replace('/(rpic:\/\/)([^\s<]+[^\.!?&,\)\(\<\-\s])/', '
', $text); // picture on right side of wrapped text $text = preg_replace('/(lpic:\/\/)([^\s<]+[^\.!?&,\)\(\<\-\s])/', '
', $text); // remove empty tags $text = str_replace("\n
\n", ' ', $text); // remove line separators $text = str_replace("
", '', $text); $text = str_replace(" ", '', $text); // done - return return $text; }$MetaDescription = "Falsche Freunde, False Friends oder im Französischen Faux Amis genannt, sind Wörter, die in Deutsch und Französisch ähnlich oder gleich geschrieben oder ausgesprochen werden, aber eine unterschiedliche Bedeutung haben."; $MetaKeywords = "französisch, Sprache, faux, amix, false friends, bedeutung, problem, hilfe"; $h1_txt = "Faux Amis: Deutsch-Französisch"; $title_txt = "Falsche Freunde oder Faux Amis: Deutsch-Französisch"; $multi_title ="true"; ?> Hilfe zu Französisch
Hilfe zu Französisch
* Faux Amis Faux Amis
Home
Französisch-Tests:
Fragen und Antworten
nicht_existent.
ein Adressat - un destinataire
Home
Grammatik und Vokabel-Tests
Kontakt
Haftung
Impressum
Problem-Hilfe Startseite
Englisch-Hilfe
![]()
Hinweis: Wir haben erst angefangen. Unsere Seite ist noch im Wachstum begriffen! Wiederkommen lohnt sich also! Besonders würden wir uns freuen, wenn Sie auch andere von unserer Seite wissen lassen, z.B. durch einen Link./************************************************************************ Description ************************************************************************* This PHP function takes a block of "formatted" ASCII text and converts it to valid HTML formatting. Specifically, it does the following: *text* becomes bolded _text_ becomes italicized (no, not underlined, see FAQ below) lines starting with * or . or - or -- are converted to bulleted lists lines starting with 1.2.3. or 1)2)3) or # are converted to numbered lists ------,______,======= are converted to horizontal rules http://, mailto://, ftp:// links are made live indented text converts to blockquotes new lines convert to paragraphs html entities are converted to their equivalents (that is, & becomes &, etc) ************************************************************************/ function text2html($text, $lnpath) { // fix line breaks $text = str_replace("\r\n","\n",$text); // windows to unix $text = str_replace("\r","\n",$text); // mac to unix $text = preg_replace("/^\n+/",'',$text); // trim beginning linebreaks $text = preg_replace("/\n+$/",'',$text); // trim ending linebreaks // convert to html entities #$text = htmlentities($text); // line $text = preg_replace('/______/','
',$text); // line $text = preg_replace('/======/','
',$text); // line $text = preg_replace('/------/','
',$text); // line // a blank line $text = preg_replace('/BL-BL/','
',$text); // line // add styles $text = preg_replace('/_([^ _][^_]*?)_/','\1',$text); // set italics $text = preg_replace('/\*([^_][^_]*?)\*/','\1',$text); // set bolds // add headlines $text = preg_replace('/====(.*?)====/','\1
',$text); // set italics $text = preg_replace('/===(.*?)===/','\1
',$text); // set italics $text = preg_replace('/==(.*?)==/','\1
',$text); // set italics $text = preg_replace('/=(.*?)=/','\1
',$text); // set italics // add paragraphs $text = "\n\n " . str_replace("\n"," \n\n", $text) . " \n\n"; #echo $text; // add horizontal rules preg_replace('/ [\s]*?[-=_]{5,}[\s]*?<\/line>/', '
',$text); // add unordered lists $text = preg_replace('/[\s]*?(\*|\.|\-)-?[\s]*?([^\s].*?)<\/line>/', ' \n\n- \2
',$text); $text = preg_replace('/<\/line>[\s]*?- /', "
\n
\n\n- ",$text); $text = preg_replace('/<\/li>[\s]*?
\n/', " ",$text); // add ordered lists $text = preg_replace('/ [\s]*?[\d#]+(\.|\))[\s]*?([^\s].*?)<\/line>/', ' - \2
',$text); $text = preg_replace('/<\/(line|ul)>[\s]*?- /', "\\1>\n\n
\n
\n\n<\\1>",$text); // add blockquotes $text = preg_replace('/- ",$text); $text = preg_replace('/<\/li>[\s]*?<(line|ul)>/', "
\n[\t ]+?([^\s].*?)<\/line>/', ' \1',$text); $text = preg_replace('/<\/blockquote>[\s]*?/', "\n\n",$text); // optimize any white space $text = preg_replace('/ +/',' ', $text); $text = preg_replace("/\t+/","\t", $text); $text = preg_replace("/\n+/","\n", $text); // remove adjacant lists $text = preg_replace("/<\/ol>\n/", '',$text); $text = preg_replace("/<\/ul>\n
/", '',$text); // highlight any links (watch out encroaching tags and for punctuation) $text = preg_replace('/(http:\/\/|https:\/\/|ftp:\/\/|mailto:)([^\s<]+[^\.!?&,\)\(\<\-\s])/', '\1\2', $text); // local links $text = preg_replace('/(httpl:\/\/)([^\s<]+[^\.!?&,\)\(\<\-\s])/', '\2', $text); // picture $text = preg_replace('/(apic:\/\/)([^\s<]+[^\.!?&,\)\(\<\-\s])/', '
', $text); // picture on right side of wrapped text $text = preg_replace('/(rpic:\/\/)([^\s<]+[^\.!?&,\)\(\<\-\s])/', '
', $text); // picture on right side of wrapped text $text = preg_replace('/(lpic:\/\/)([^\s<]+[^\.!?&,\)\(\<\-\s])/', '
', $text); // remove empty tags $text = str_replace("\n
\n", ' ', $text); // remove line separators $text = str_replace("
", '', $text); $text = str_replace(" ", '', $text); // done - return return $text; }